﻿@using Super.Entities;
@model List<PayRecord>
@using Super.Infrastructure;
@using Super.DomainService;
@using Super.Common;
@{
    ViewBag.Title = "收支流水";
    
}
<div class="pageHeader">
    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="/admin/pay/index" method="post">
    <div class="searchBar">
        <ul class="searchContent">
            <li>
                @Html.DWZTextBox("keyword", "关键词【订单号、交易号、主题】：")
            </li>
            <li><label>分类：</label>
                @Html.DropDownList("ChangeType", null, "请选产品分类", new { @class = "input_01", @style = "width:151px;height:25px;" })
            </li>
            <li><label>创建时间大于：</label> <input id="startTime" name="startTime" class="date" alt="请选择起始日期！" /> </li>
        </ul>
        @Html.SubBar()
    </div>
    <input type="hidden" name="pageNum" value="1" /><!--【必须】value=1可以写死-->
    <input type="hidden" name="orderDirection" value="@ViewBag.orderDirection" /><!--【可选】升序|降序-->
    <input type="hidden" name="orderField" value="@ViewBag.orderField"/><!--【可选】升序|降序-->
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="delete" href="/admin/pay/delete?id={sid_user}" target="ajaxTodo" title="确定要删除吗？" warn="请选择一个用户"><span>删除</span></a></li>
        </ul>
    </div>
    <div layouth="116" id="w_list_print">
        <table class="list" width="98%" targettype="navTab" asc="asc" desc="desc">
            <thead>
                <tr>
                    <th width="100">交易号</th>
                    <th width="100">订单号</th>
                    <th width="100">主题</th>
                    <th width="100">金额</th>
                    <th width="100">收支项目</th>
                    <th width="100">收支类型</th>
                    <th width="100">创建时间</th>
                    <th width="200">描述</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr target="sid_user" rel="@item.ID">
                        <td>@item.TradeNo</td>
                        <td>@item.OrderNo</td>
                        <td>@item.Subject</td>
                        <td>@item.Money</td>
                        <td>@item.MoneyChangeType.Name</td>
                        <td>
                            @{
                                if (item.MoneyChangeType.InOut == 1)
                                {
                                            <span style="color: green" class="In">收入</span>
                                }
                                if (item.MoneyChangeType.InOut == 2)
                                {
                                            <span style="color: red" class="Out">支出</span>
                                }
                            }
                        </td>
                        <td>@item.CreateTime</td>
                        <td>@item.Description</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="panelBar">
        <div class="pages">
            <span>共 @ViewBag.RecordCount 条</span>

            <span>，支出金额：</span><span style="color: red">@ViewBag.outMoney</span>
            <span>，收入金额：</span><span style="color: green">@ViewBag.inMoney</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="@ViewBag.RecordCount" numperpage="@ViewBag.PageSize" pagenumshown="10" currentpage="@ViewBag.PageIndex">
        </div>
    </div>
</div>
